//
//  MyTabBarController.m
//  EasyChat
//
//  Created by romana on 16/6/15.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MyTabBarController.h"

#import "ChatViewController.h"
#import "ContentViewController.h"
#import "DiscoveryViewController.h"
#import "UserViewController.h"

@interface MyTabBarController ()

@end

@implementation MyTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    // 各种tabBar的设置
    ChatViewController *chatVC = [[ChatViewController alloc] init];
    UINavigationController *chatNavi = [[UINavigationController alloc] initWithRootViewController:chatVC];
    [chatVC release];
    
    chatNavi.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"聊天" image:[UIImage imageNamed:@"Unknown"] tag:100001];
    
    ContentViewController *contentVC = [[ContentViewController alloc] init];
    UINavigationController *contentNavi = [[UINavigationController alloc] initWithRootViewController:contentVC];
    [contentVC release];
    contentNavi.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"通讯录" image:[UIImage imageNamed:@"Unknown-2"] tag:100002];
    
    DiscoveryViewController *discoverVC = [[DiscoveryViewController alloc] init];
    UINavigationController *discoverNavi = [[UINavigationController alloc] initWithRootViewController:discoverVC];
    [discoverVC release];
    discoverNavi.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"发现" image:[UIImage imageNamed:@"Unknown-5"] tag:100003];
    
    UserViewController *userVC = [[UserViewController alloc] init];
    UINavigationController *userNaci = [[UINavigationController alloc] initWithRootViewController:userVC];
    [userVC release];
    userNaci.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我的" image:[UIImage imageNamed:@"Unknown-7"] tag:100004];
    
//    UITabBarController *tabBar = [[UITabBarController alloc] init];
    
    // tabBar
    self.viewControllers = @[chatNavi, contentNavi, discoverNavi, userNaci];
    
    // tabBar点击后的颜色
    self.tabBar.tintColor = [UIColor blueColor];
    
    
    
    
}



@end
